package com.aerotechnic.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aerotechnic.dao.implementation.AvionDao;
import com.aerotechnic.entities.Avion;
import com.aerotechnic.service.interfaces.AvionBoIn;

@Service("Avionbo")
@Transactional
public class AvionBo implements AvionBoIn{
	
	@Autowired
	private AvionDao avionDao;

	@Override
	public void save(Avion myEntity) {
		// TODO Auto-generated method stub
		
		avionDao.save(myEntity);
		
	}

	@Override
	public void update(Avion myEntity) {
		// TODO Auto-generated method stub
		
		avionDao.update(myEntity);
		
	}

	@Override
	public List<Avion> findAll() {
		// TODO Auto-generated method stub
		return avionDao.findAll();
	}

	@Override
	public void delete(Long id) {
		// TODO Auto-generated method stub
		avionDao.delete(id);
	}

	@Override
	public Avion findByID(Long id) {
		// TODO Auto-generated method stub
		return avionDao.findByID(id);
	}
	
	// here goes the business code

}
